package demo.platform;

import java.awt.EventQueue;

import javax.swing.JFrame;

/**
 * This is the JFrame that will contain our game.
 * Sets the title and other characteristics of the
 * JFrame.
 * @author josh
 *
 */
public class Main extends JFrame {

	public Main() {
		initUI();
	}
	
	private void initUI() {
		//setLayout(null);
		add(new Field());
		setTitle("Platform");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(1024,768); // 16x12 viewable tiles, no real reason to have much more.
						   // Each tile is 64x64.
		pack();
		setLocationRelativeTo(null);
		setVisible(true);
	}
	
	public static void main (String args[]) {
		
		// Separates the rendering thread from other operations.
		// Keeps cpu intensive methods from causing lag.
		EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                Main m = new Main();
                m.setVisible(true);
            }
        });
		
	}
}
